@@ -27,7 +27,7 @@ def exec_send_jsapi_hb(user, elog, amount):  | 
            ||
| 27 | 27 | 
                 | 
            
| 28 | 28 | 
                 | 
            
| 29 | 29 | 
                def exec_clerk_send_jsapi_hb(user, elog, amount):  | 
            
| 30 | 
                - send_jsapi_hb(user.brand_id, user.openid, amount, transfer=False)  | 
            |
| 30 | 
                + send_jsapi_hb(user.brand_id, user.openid, amount, transfer=False, clerk=True)  | 
            |
| 31 | 31 | 
                 | 
            
| 32 | 32 | 
                elog.has_clerk_send_redpack = True  | 
            
| 33 | 33 | 
                elog.clerk_redpack_send_amount = amount  | 
            
                @@ -10,7 +10,7 @@ from account.models import UserInfo  | 
            ||
| 10 | 10 | 
                WECHAT = settings.WECHAT  | 
            
| 11 | 11 | 
                 | 
            
| 12 | 12 | 
                 | 
            
| 13 | 
                -def send_jsapi_hb(brand_id, openid, amount, transfer=True):  | 
            |
| 13 | 
                +def send_jsapi_hb(brand_id, openid, amount, transfer=True, clerk=False):  | 
            |
| 14 | 14 | 
                trade_type = 'JSAPI'  | 
            
| 15 | 15 | 
                # 根据 trade_type 获取 wechat 配置  | 
            
| 16 | 16 | 
                     wxcfg = WECHAT.get('{}:{}'.format(brand_id, trade_type), {})
               | 
            
                @@ -20,7 +20,7 @@ def send_jsapi_hb(brand_id, openid, amount, transfer=True):  | 
            ||
| 20 | 20 | 
                if transfer:  | 
            
| 21 | 21 | 
                ret_data = wxpay.transfer.transfer(openid, amount, u'企业付款', check_name='NO_CHECK')  | 
            
| 22 | 22 | 
                else:  | 
            
| 23 | 
                -        wxrpk = wxcfg.get('redpack', {})
               | 
            |
| 23 | 
                +        wxrpk = wxcfg.get('clerkredpack', {}) if clerk else wxcfg.get('redpack', {})
               | 
            |
| 24 | 24 | 
                ret_data = wxpay.redpack.send(  | 
            
| 25 | 25 | 
                openid,  | 
            
| 26 | 26 | 
                amount,  |